<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="UTF-8" />
  <title>v-for 示例</title>
  <script src="https://cdn.bootcdn.net/ajax/libs/vue/3.4.21/vue.global.min.js "></script>
</head>
<body>
<div id="app">
  <ul>
    <li v-for="fruit in fruits" :key="fruit">{{ fruit }}</li>
  </ul>
</div>

<script>
  const { createApp } = Vue;

  createApp({
    data() {
      return {
        fruits: ["苹果", "香蕉", "橙子"]
      };
    }
  }).mount("#app");
</script>
</body>
</html>